<%= hidden_field_tag 'action_to_perform', action_to_perform %>
<div class="invoice_model">
  <div class="grid_table">
    <table cellpadding="0" cellspacing="0">
      <colgroup>
        <col class="one"/>
        <col class="two"/>
        <col class="three"/>
        <col class="four"/>
      </colgroup>
      <thead>
      <tr>
        <th class="align_center"><%= t('invoice') %>#</th>
        <th class="align_left"><%= t('client') %></th>
        <th class="align_center"><%= t('views.common.date') %></th>
        <th class="align_right"><%= t('views.dashboard.amount') %></th>
      </tr>
      <% @invoices_with_payments.each do |inv| %>
          <%= hidden_field_tag "invoice_ids[]", inv.id %>
          <tr>
            <td class="align_center"><%= inv.invoice_number %></td>
            <!--<td class="align_left"><%#= inv.client.organization_name unless inv.client.organization_name.blank? %></td>-->
            <td class="align_left"><%= inv.client.present?? inv.client.organization_name : inv.unscoped_client.organization_name %></td>
            <td class="align_center"><%= inv.invoice_date %></td>
            <td class="align_right"><%= number_to_currency(inv.invoice_total, unit: inv.currency.unit.present? ? inv.currency.unit : "$" ) %>
              <!--<span class="tt"> <%#= current_user.currency_code %></span></td>-->
          </tr>
      <% end %>
      </thead>
    </table>
      </div>
  <!--grid_table-->
</div><!--invoice_model-->




